package com.parking.service;

import com.parking.entity.ParkingLot;
import com.parking.entity.ParkingOrder;
import com.parking.entity.ParkingSpace;

import java.util.List;
import java.util.Optional;

public interface ParkingService {
    // ParkingLot related methods
    ParkingLot createParkingLot(ParkingLot parkingLot);
    List<ParkingLot> getAllParkingLots();
    Optional<ParkingLot> getParkingLotById(Long id);
    void deleteParkingLot(Long id);

    // ParkingSpace related methods
    ParkingSpace createParkingSpace(Long parkingLotId, ParkingSpace space);
    List<ParkingSpace> getParkingSpacesByLotId(Long parkingLotId);
    List<ParkingSpace> getAvailableSpacesByLotId(Long parkingLotId);
    ParkingSpace occupySpace(Long spaceId, String licensePlate);
    ParkingSpace releaseSpace(Long spaceId);

    // ParkingOrder related methods
    ParkingOrder createOrder(Long spaceId, String licensePlate);
    ParkingOrder completeOrder(Long spaceId);
    List<ParkingOrder> getOrdersByLicensePlate(String licensePlate);
    double calculateFee(ParkingOrder order);
}